<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<script type="text/javascript" src="http://img2.wyzc.com/public/js/jquery/jquery-1.8.2.min.js?wyzc_v=201406201655"></script>
</head>
<body>

<script>
	$.extend({
		log: function(message) {
			var now = new Date(),
					y = now.getFullYear(),
					m = now.getMonth() + 1, //！JavaScript中月分是从0开始的
					d = now.getDate(),
					h = now.getHours(),
					min = now.getMinutes(),
					s = now.getSeconds(),
					time = y + '/' + m + '/' + d + ' ' + h + ':' + min + ':' + s;
			console.log(time + ' My App: ' + message);
		}
	})

	$.log('初始化...');

	/**
	 * 计数器
	 * @returns {Function}
	 */
	function count(start) {
		var num = start | 0;
		return function () {
			num++;
			return num;
		}
	}
	var counter = count(4);
	//每次+1
	console.log(counter()); //1
	console.log(counter()); //2
	console.log(counter()); //3
	console.log(counter()); //4

	//var media = {};
	//var time = file.duration;
	//var timeArr = time.split(':');
	//var h = parseInt(timeArr[0]);
	//media.minute = parseInt(timeArr[1]);
	//media.minute += h * 60;
	//media.second = parseInt(timeArr[2]);
	//media.polyvVideoSize = media.minute * 60 + media.second;
	//media.vid = file.vid;
	//file.uri = file.swf_link;
	//file.name = file.title;
	//file.source = 'polyv';
	//media.videoInfo = JSON.stringify(file);
	//return media;
</script>
</body>
</html>